package com.testmanager.testmananger.shuiyou.strCompare.respository;

import com.testmanager.testmananger.shuiyou.strCompare.domain.SyCompareTaskEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SyCompareTaskRepository extends JpaRepository<SyCompareTaskEntity,Long>, JpaSpecificationExecutor<SyCompareTaskEntity>
        , QuerydslPredicateExecutor<SyCompareTaskEntity> {

    SyCompareTaskEntity findById(long id);

    SyCompareTaskEntity findByTaskno(String taskno);

    List<SyCompareTaskEntity>  findAllByScriptId(String scriptno);


    @Modifying
    Integer deleteAllByTaskno(String taskno);

    @Modifying
    Integer  deleteAllByScriptId(String scriptno);
}
